Skip to content

Instantly share code, notes, and snippets.

@Hirrolot
Hirrolot / cps-eval.ml
Created March 24, 2023 10:34
A simple CPS evaluation as in "Compiling with Continuations", Andrew W. Appel
type cps_var =
(* Taken from the lambda term during CPS conversion. *)
| CLamVar of string
(* Generated uniquely during CPS conversion. *)
| CGenVar of int
type cps_term =
| CFix of (cps_var * cps_var list * cps_term) list * cps_term
| CAppl of cps_var * cps_var list
| CRecord of cps_var list * binder
@GrayHatGuy
GrayHatGuy / iridium-sdr.md
Last active May 9, 2024 15:19
Iridium satellite cheat sheet for hackrf SDR capture using gr-iridium iridium-toolkit and iridium live

Description

This details how to capture voice text and rings associated with iridium satellite rebroadcasts of the Aircraft Communications Addressing and Report System (ACARS)

Prerequisites:

  • Start installation in home directory preferred
    cd ~
    
  • Install the following repos preferably from source or using apt in home directory or /usr/scr/:
@Hirrolot
Hirrolot / a-preface.md
Last active May 9, 2024 15:19
A complete implementation of the positive supercompiler from "A Roadmap to Metacomputation by Supercompilation" by Gluck & Sorensen

Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:

A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by the program; let us call this machine M1. In observing the operation of

@nickytonline
nickytonline / settings.jsonc
Created May 5, 2024 18:25
Latest VS Code Settings
{
// miscellaneous
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": false,
// window
"window.title": "🦙⚡🫡 – ${activeEditorShort}${separator}${rootName} – 🫡⚡🦙",
"window.clickThroughInactive": false,
@troyfontaine
troyfontaine / 1-setup.md
Last active May 9, 2024 15:16
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@jaypei
jaypei / use_c_sleep.go
Last active May 9, 2024 15:12
Golang的调度机制决定Sleep是用户态实现的。但实现存在一个问题,若go程序在Sleep的过程中系统时间发生变化,Sleep会不准确,因为runtime中的实现是通过时间列表判断每个goroutine的挂起时间,而这个时间就是用的系统时间。这段代码是用cgo调用C的sleep规避这个问题的实现。
package main
/*
#include <unistd.h>
*/
import "C"
import (
"fmt"
"time"
)
@debkanchan
debkanchan / regex.md
Last active May 9, 2024 15:12
RegEx for Latitude and Longitude

Regular Expression(RegExp) for Latitude and Longitude

Just Latitude:

^-?([0-8]?[0-9]|90)(\.[0-9]{1,10})$

matches:

  • 56.3847
  • -56.387

unmatches:

@Klerith
Klerith / Instalaciones-React.md
Last active May 9, 2024 15:10
Instalaciones recomendadas para mi curso de React de cero a experto
@Quick104
Quick104 / readme.md
Last active May 9, 2024 15:07
Expose a server behind CG:NAT via Wireguard